package P5719;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();
        int num = n/k;
        int kind1 = k * (num+1);
        double kind2 = (n*(n+1)-kind1*num+0.0)/(n-num);
        System.out.println(((kind1+0.0)*5)/10.0 + " " + ((int)(kind2 * 5 +0.5))/10.0);
    }
}
